function fixPNG() {
	var myImage = document.getElementById("logo");
	var arVersion = navigator.appVersion.split("MSIE");
	var version = parseFloat(arVersion[1]);
	if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
    var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
    var imgTitle = (myImage.title) ? 
               "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
    var imgStyle = "display:inline-block;" + myImage.style.cssText
    var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
    myImage.outerHTML = strNewHTML   
    }
}

function setCluMenu(obj){
	var menuclum = obj.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;//取得当前对象所在的大容器对象
	var menuclumcell = obj.parentNode.parentNode.parentNode.parentNode.cellIndex;
	for(i=0;i<menuclum.rows.item(0).cells.length;i++){
		menuclum.rows.item(0).cells[i].className = 'clumMenuCovOut';
		menuclum.rows.item(0).cells[menuclumcell].className = 'clumMenuCovDown';
		}
	}

function ClumMenuOver(obj){
	var menuclum = obj.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;//取得当前对象所在的大容器对象
	var menuclumcell = obj.parentNode.parentNode.parentNode.parentNode.cellIndex;//取得对象所在的列数
	menuclum.rows.item(0).cells[menuclumcell]//取得当前对象所在的列对象
	//menuclum.rows.item(0).cells[menuclumcell].className = 'clumMenuCovOver';
	//alert(menuclum.rows.item(0).cells[menuclumcell].className);
	if(menuclum.rows.item(0).cells[menuclumcell].className != 'clumMenuCovDown'){
		menuclum.rows.item(0).cells[menuclumcell].className = 'clumMenuCovOver';
		}
	}
	
function ClumMenuOut(obj){
	var menuclum = obj.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;//取得当前对象所在的大容器对象
	var menuclumcell = obj.parentNode.parentNode.parentNode.parentNode.cellIndex;//取得对象所在的列数
	//menuclum.rows.item(0).cells[menuclumcell]//取得当前对象所在的列对象
	if(menuclum.rows.item(0).cells[menuclumcell].className != 'clumMenuCovDown'){
		menuclum.rows.item(0).cells[menuclumcell].className = 'clumMenuCovOut';
		}
	}
	

function buttonDown(obj){
	var menuclum = obj.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;//取得当前对象所在的大容器对象
	var menuclumcell = obj.parentNode.parentNode.parentNode.parentNode.cellIndex;
	menuclum.rows[0].cells[menuclumcell].className = 'buttonDown';
	}

function buttonOver(obj){
	var menuclum = obj.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;//取得当前对象所在的大容器对象
	var menuclumcell = obj.parentNode.parentNode.parentNode.parentNode.cellIndex;
	menuclum.rows[0].cells[menuclumcell].className = 'buttonOver';
	}

function buttonOut(obj){
	var menuclum = obj.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;//取得当前对象所在的大容器对象
	var menuclumcell = obj.parentNode.parentNode.parentNode.parentNode.cellIndex;
	menuclum.rows[0].cells[menuclumcell].className = 'buttonOut';
	}


var menuBak;
function menuOpreat(obj){
	var leftmen = document.getElementById("leftmenu");
	var menu_O = leftmen.getElementsByTagName("ul"); 
	var menu_P = leftmen.getElementsByTagName("ol");
	var tablerows = leftmen.rows.length;
	var bodyh = document.body.clientHeight;
	var menuh = 24;
	var modh = bodyh-tablerows*menuh-6;
	var trows = obj.parentNode.parentNode.parentNode.rowIndex;
	
	
	if(modh>0){
		for(i=0;i<menu_O.length;i++){
			menu_O[i].parentNode.style.display = "none";
			menu_O[trows].parentNode.style.display = "block";
			menu_O[trows].style.height = modh+'px';
			menu_P[i].className = 'mainMenuOut';
			menu_P[trows].className = 'mainMenuDown';
			}
		}
	else{alert("建议把你的窗口最大化使用");}
	menuBak = obj;
	}

function setMenuLoad(){
	var leftmen = document.getElementById("leftmenu");
	if(menuBak){
		menuOpreat(menuBak);
		}
	else{
		menuOpreat(leftmen.getElementsByTagName('ol')[0]);
		}
	}
	
function mainMenuOver(obj){
	if(obj.className!='mainMenuDown'){
		obj.className='mainMenuOver';
		}
	}
	
function mainMenuOut(obj){
	if(obj.className!='mainMenuDown'){
		obj.className='mainMenuOut';
		}
	}
	
function smmenuLastStyle(){
	var leftmen = document.getElementById("leftmenu");
	var menu_O = leftmen.getElementsByTagName("ul");
	for(i=0;i<menu_O.length;i++){
		var smmenu = menu_O[i].getElementsByTagName("li");
		for(j=0;j<smmenu.length;j++){
			smmenu[j].className="smmenuN";
			smmenu[smmenu.length-1].className="smmenuL";
			}
		}
	}
	
function infoSrcoll(){
	var SrcollDiv = document.getElementById("infoSrcoll");
	var bodyh = document.body.clientHeight;
	var bodyw = document.body.clientWidth;
	var buttonCov;
	var conListAlt;
	var pageCov;
	var sideCov;
	if(!document.getElementById("buttonCov")){buttonCov = 0;}
	else{buttonCov = document.getElementById("buttonCov").offsetHeight;}
	
	if(!document.getElementById("sideCov")){sideCov = 0;}
	else{sideCov = document.getElementById("sideCov").offsetWidth;}
	
	if(!document.getElementById("conListAlt")){conListAlt = 0;}
	else{conListAlt = document.getElementById("conListAlt").offsetHeight;}
	
	if(!document.getElementById("pageCov")){pageCov = 0;}
	else{pageCov = document.getElementById("pageCov").offsetHeight;}
	
	SrcollDiv.style.height = bodyh-buttonCov-pageCov-conListAlt+"px";
	SrcollDiv.style.width = bodyw - sideCov +"px";
	//alert(sideCov);
	//alert(SrcollDiv.style.height);
	}
	
function inputSrcoll(){
	var SrcollDiv = document.getElementById("infoSrcoll");
	var bodyh = document.body.clientHeight;
	var bodyw = document.body.clientWidth;
	//var infoTitle = document.getElementById("infoTitle").offsetHeight;
	//var infoObject = document.getElementById("infoObject").offsetHeight;
	var buttonCov = document.getElementById("buttonCov").offsetHeight;
	SrcollDiv.style.height = bodyh-buttonCov+"px";
	SrcollDiv.style.width = bodyw+"px";
	//alert(SrcollDiv.style.height);
	}
	
function uploadFile(){
	var uploadFile = document.getElementById("uploadFile");
	uploadFile.onclick();
	}
	
function checkJsName(obj){
	var obj_bak = document.getElementById(obj);
	var inputValue = obj_bak.innerHTML;
	var obj_input = document.getElementById('in'+obj);
	obj_bak.style.display = 'none';
	obj_input.style.display = 'block';
	}
	
	
function formatFloat(src, pos)
{
    return Math.round(src*Math.pow(10, pos))/Math.pow(10, pos);
}
	
function uploadFileList(){
	var fileAllSize=1890;
	var fileUpSize=1890;
	var uploadingwidth = 100;
	var uploading = formatFloat(fileUpSize/fileAllSize*100,0);
	//alert(uploading);
	var uploadFileList = document.getElementById("uploadFileList");
	var fileCov = document.getElementById("fileCov");
	var fileValue;
	if(navigator.userAgent.indexOf("MSIE")>0) { 
		var str = fileCov.value;
		fileCovBak = str.split("\\");
		fileValue = fileCovBak[fileCovBak.length-1]; 
		}
	else if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){ 
		fileValue=fileCov.value;
	}
	else{
		fileValue=fileCov.value;
	}
   
   
	if(fileValue!=''){
		//alert(uploadFileList.childNodes.length);
		if(uploadFileList.innerHTML =='当前没有任何附件'){
			uploadFileList.innerHTML = '';
			}
		
		if(fileUpSize!=fileAllSize){
			uploadFileList.innerHTML += "<li><table border='0' cellpadding='0' cellspacing='0'><tr><td height='20' align='left' valign='middle'>"+fileValue+"</td><td align='left' valign='middle'><div style='width:"+uploadingwidth+"px; border:1px #333333 solid; height:10px; line-height:10px; font-size:1px; overflow:hidden; margin-top:5px;margin-left:5px;margin-right:5px;'><div style='width:"+(fileUpSize/fileAllSize*uploadingwidth)+"px; height:10px; line-height:10px; font-size:10px; background:#00FF99; overflow:hidden;'></div></div></td><td>"+uploading+"%</td></tr></table></li>";
			}
		else{uploadFileList.innerHTML += "<li>"+fileValue+"<a onclick='delFileList(this)' class='delFileList'>删除</a></li>";}
		
		}
		
		
	}
	
function uploadFileLi(){
	var uploadFileList = document.getElementById("FileList");
	var fileCov = document.getElementById("fileCov");
	var fileValue;
	if(navigator.userAgent.indexOf("MSIE")>0) { 
		var str = fileCov.value;
		fileCovBak = str.split("\\");
		fileValue = fileCovBak[fileCovBak.length-1]; 
		}
	else if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){ 
		fileValue=fileCov.value;
	}
	else{
		fileValue=fileCov.value;
	}
   
   
	if(fileValue!=''){
		//alert(uploadFileList.childNodes.length);
		if(uploadFileList.innerHTML =='当前没有任何文件'){
			uploadFileList.innerHTML = '';
			}
		
		uploadFileList.innerHTML += "<li>"+fileValue+"<a onclick='delFileLi(this)' class='delFileList'>删除</a></li>";
		
		}
		
		
	}
	
function delFileList(obj){
	obj.parentNode.parentNode.removeChild(obj.parentNode);
	var uploadFileList = document.getElementById("uploadFileList");
	if(uploadFileList.childNodes.length==0){
		uploadFileList.innerHTML ='当前没有任何附件';
		}
	//alert(obj.parentNode.tagName);
	}
	
function delFileLi(obj){
	obj.parentNode.parentNode.removeChild(obj.parentNode);
	var uploadFileList = document.getElementById("FileList");
	if(uploadFileList.childNodes.length==0){
		uploadFileList.innerHTML ='当前没有任何文件';
		}
	//alert(obj.parentNode.tagName);
	}
	
function listOver(obj,r){
	var listGroup = document.getElementById("listGroup");
	//alert(objInput);
	var objRow = r.rowIndex;
	for(i=0;i<listGroup.rows.length;i++){
		listGroup.rows[i].className = "listOut";
		listGroup.rows[i].cells[1].innerHTML = "";
		}
		
	listGroup.rows[objRow].className = "listOver";
	listGroup.rows[objRow].cells[1].innerHTML = "<img src='../../images/imgUpdata.gif' width='9' height='9' border='0' style='cursor:pointer;' onMouseDown=listUpCov('"+obj+"','in"+obj+"','div"+obj+"',this)><img src='../../images/imgdelet.gif' width='9' height='9' border='0' style='cursor:pointer;' onMouseDown =\"alert('删除此通讯组')\">";
	}

function listUpCov(text,input,div,obj){
	var objText = document.getElementById(text);
	var objInput = document.getElementById(input);
	var objDiv = document.getElementById(div);
	objInput.value = objText.innerHTML;
	
	obj.style.display = 'none';
	//alert(obj.tagName);
	objText.style.display = 'none';
	//objInput.style.display = 'block';
	objDiv.style.display = 'block';
	}
	
function setGroupName(obj){
	var objText = document.getElementById(obj);
	var objInput = document.getElementById("in"+obj);
	var objDiv = document.getElementById("div"+obj);
	objText.innerHTML = objInput.value;
	//alert(objText.innerHTML);
	objText.style.display = 'block';
	//objInput.style.display = 'none';
	objDiv.style.display = 'none';
	}	

function addListGroup(obj){
	var bodyh = document.body.clientHeight;
	var bodyw = document.body.clientWidth;
	var conh = document.body.scrollHeight;
	var float_bg = document.getElementById("float_bg");
	var float_zz = document.getElementById("float_zz");
	var bakDiv = document.getElementById(obj);
	
	float_bg.style.display = "block";
	float_bg.style.z_index = '30000';
	float_zz.style.display = "block";
	bakDiv.style.display = "block";
	
	float_bg.style.height = conh;
	float_zz.style.height = conh;
	
	var float_nrw = bakDiv.offsetWidth;
	var float_nrh = bakDiv.offsetHeight;
	bakDiv.style.left = (bodyw-float_nrw)/2;
	bakDiv.style.top = (bodyh-float_nrh)/2 + document.body.scrollTop;
	}
	
	
function updataListInfo(obj,name,phone,qq,mail){
	var bodyh = document.body.clientHeight;
	var bodyw = document.body.clientWidth;
	var conh = document.body.scrollHeight;
	var float_bg = document.getElementById("float_bg");
	var float_zz = document.getElementById("float_zz");
	var bakDiv = document.getElementById(obj);
	var listName = document.getElementById('listName');
	var listPhone = document.getElementById('listPhone');
	var listQQ = document.getElementById('listQQ');
	var listMail = document.getElementById('listMail');
	
	float_bg.style.display = "block";
	float_bg.style.z_index = '30000';
	float_zz.style.display = "block";
	bakDiv.style.display = "block";
	
	float_bg.style.height = conh;
	float_zz.style.height = conh;
	
	var float_nrw = bakDiv.offsetWidth;
	var float_nrh = bakDiv.offsetHeight;
	bakDiv.style.left = (bodyw-float_nrw)/2;
	bakDiv.style.top = (bodyh-float_nrh)/2 + document.body.scrollTop;
	listName.value = name;
	listPhone.value = phone;
	listQQ.value = qq;
	listMail.value = mail;
	}
	
function closelistDiv(obj){
	var float_bg = document.getElementById("float_bg");
	var float_zz = document.getElementById("float_zz");
	var bakDiv = document.getElementById(obj);
	
	float_bg.style.display = "none";
	float_zz.style.display = "none";
	bakDiv.style.display = "none";
	}
	
function loadSize(){
	var allSize = document.getElementById("allSize").innerHTML;
	var useSize = document.getElementById("useSize").innerHTML;
	
	var allSizeBg = document.getElementById("allSizeBg").offsetWidth;
	var useSizeBg = document.getElementById("useSizeBg");
	var Percentage = document.getElementById("Percentage");
	
	var uploading = formatFloat(useSize/allSize*100,0);
	Percentage.innerHTML = uploading+"%";
	useSizeBg.style.width = uploading+"%";
	}
	
function updataJspy(title,con,stuid,id,obj){//分别是评语标题，评语内容，学生id号,评语编号,浮动对象
	var bodyh = document.body.clientHeight;
	var bodyw = document.body.clientWidth;
	var conh = document.body.scrollHeight;
	var float_bg = document.getElementById("float_bg");
	var float_zz = document.getElementById("float_zz");
	var bakDiv = document.getElementById(obj);
	var stuId = document.getElementById("stuId");
	var pyId = document.getElementById("pyId");
	var pyTitle = document.getElementById("pyTitle");
	var pyCon = document.getElementById("pyCon");
	
	float_bg.style.display = "block";
	float_bg.style.z_index = '30000';
	float_zz.style.display = "block";
	bakDiv.style.display = "block";
	
	float_bg.style.height = conh;
	float_zz.style.height = conh;
	
	var float_nrw = bakDiv.offsetWidth;
	var float_nrh = bakDiv.offsetHeight;
	bakDiv.style.left = (bodyw-float_nrw)/2;
	bakDiv.style.top = (bodyh-float_nrh)/2 + document.body.scrollTop;
	stuId.value = stuid;
	pyId.value = id;
	pyTitle.value = title;
	pyCon.value = con;
	}
	
function pymbOpretion(mbid,obj){
	var bodyh = document.body.clientHeight;
	var bodyw = document.body.clientWidth;
	var conh = document.body.scrollHeight;
	var float_bg = document.getElementById("float_bg");
	var float_zz = document.getElementById("float_zz");
	var bakDiv = document.getElementById(obj);
	var mbid = document.getElementById("pyId");
	
	float_bg.style.display = "block";
	float_bg.style.z_index = '30000';
	float_zz.style.display = "block";
	bakDiv.style.display = "block";
	
	float_bg.style.height = conh;
	float_zz.style.height = conh;
	
	var float_nrw = bakDiv.offsetWidth;
	var float_nrh = bakDiv.offsetHeight;
	bakDiv.style.left = (bodyw-float_nrw)/2;
	bakDiv.style.top = (bodyh-float_nrh)/2 + document.body.scrollTop;
	pyId.value = mbid;
	}
	
function chechHdObj(){
	var bodyh = document.body.clientHeight;
	var bodyw = document.body.clientWidth;
	var conh = document.body.scrollHeight;
	var float_bg = document.getElementById("float_bg");
	var float_zz = document.getElementById("float_zz");
	var bakDiv = document.getElementById("hdCheck");
	var checklb = document.getElementById("checklb");
	var bjCov = document.getElementById("bjCov");
	var jsCov = document.getElementById("jsCov");
	var xsCov = document.getElementById("xsCov");
	
	float_bg.style.display = "block";
	float_bg.style.z_index = '30000';
	float_zz.style.display = "block";
	bakDiv.style.display = "block";
	if(checklb.value == "2"){
		bjCov.style.display = "block";
		jsCov.style.display = "none";
		xsCov.style.display = "none";
		}
	if(checklb.value == "3"){
		bjCov.style.display = "none";
		jsCov.style.display = "block";
		xsCov.style.display = "none";
		}
	if(checklb.value == "4"){
		bjCov.style.display = "none";
		jsCov.style.display = "none";
		xsCov.style.display = "block";
		}
	
	float_bg.style.height = conh;
	float_zz.style.height = conh;
	
	var float_nrw = bakDiv.offsetWidth;
	var float_nrh = bakDiv.offsetHeight;
	bakDiv.style.left = (bodyw-float_nrw)/2;
	bakDiv.style.top = (bodyh-float_nrh)/2 + document.body.scrollTop;
	}
	
function showAdd(obj,schoolname){
	var hdObj = document.getElementById("hdObj");
	var addCov = document.getElementById("addCov");
	if(obj.value == 1){
		hdObj.value = schoolname;
		addCov.innerHTML = "&nbsp;";
		}
	else{
		hdObj.value = "";
		addCov.innerHTML = "<a href='javascript:chechHdObj()'>选择</a>";
		}
	}
	
function titleView(obj,title){
	var bodyh = document.body.clientHeight;
	var bodyw = document.body.clientWidth;
	var srcollTable = document.getElementById("srcollTable");
	var sh = srcollTable.scrollTop;
	//alert(sh);
	var obj_w = obj.offsetWidth;
	var obj_pw = obj.parentNode.offsetWidth;
	var obj_h = obj.offsetHeight;
	
	var obj_left = obj.offsetLeft;
	var obj_top = obj.offsetTop;
	var aBox = obj;
	do {
	aBox = aBox.offsetParent;
	obj_left += aBox.offsetLeft;
	obj_top += aBox.offsetTop;
	} while( aBox.tagName != "BODY" );

//alert(posX);
	var titleCov = document.getElementById("titleCov");
	var titleCon = document.getElementById("titleCon");
	titleCon.innerHTML = title;
	titleCov.style.display = "block";
	var titleW = document.getElementById("titleCov").offsetWidth;
	//alert(titleW);
	if(obj_top+obj_h>=bodyh){
		titleCov.style.top=obj_top-obj_h+2-sh;
		}
	else{titleCov.style.top = obj_top+obj_h-2-sh;}
	if(obj_left+titleW>=bodyw){
		titleCov.style.left =bodyw - titleW ;
		//alert(titleW);
		//alert("234");
		}
	else{titleCov.style.left = obj_left+obj_w-2;}
	//titleCov.style.top = obj_top+obj_h-2;
	
	
	}
	
function titleNone(){
	var titleCov = document.getElementById("titleCov");
	titleCov.style.display = "none";
	}
	
function setTchValue(obj,oDiv){
	var tchvalue = document.getElementById("tchvalue");
	tchvalue.value = obj.innerHTML;
	closelistDiv(oDiv);
	}
	
function clearkc(obj){
	obj.parentNode.innerHTML ="&nbsp;";
	}
	
function viewClear(obj){
	if(obj.childNodes[1]){
		obj.childNodes[1].style.display = '';
		}
	}
	
function outviewClear(obj){
	if(obj.childNodes[1]){
		obj.childNodes[1].style.display = 'none';
		}
	}
	
function checkType(obj){
	var kcjs = document.getElementById("kcjs");
	var jsjs = document.getElementById("jsjs");
	if(obj.value ==1){
		kcjs.style.display = 'block';
		jsjs.style.display = 'none';
		}
	if(obj.value ==2){
		kcjs.style.display = 'none';
		jsjs.style.display = 'block';
		}
	}